﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using GalaSoft.MvvmLight;
using TriviaViewModel.ServiceReference1;

namespace TriviaViewModel
{
   
    public class ScoreBoardViewModelWizard :ViewModelBase
    {
       
        /// <summary>
        /// property of users information; name and score
        /// </summary>
        private List<UserClass> _usersScore;
        public List<UserClass> UsersScore
        {
            get { return _usersScore; }
            set
            {
                if (_usersScore != value)
                {
                    _usersScore = value;
                    RaisePropertyChanged("UsersScore");
                }
            }
        }
       /// <summary>
       /// the constructor gets all user information from service
       /// </summary>
        public ScoreBoardViewModelWizard()
        {
            using (var proxy = new ServiceReference1.GameServiceClient())
            {

                UsersScore = proxy.ReturnUsers().ToList();
            }
        }
       


    }
}
